package com.dayou.bean;

import com.dayou.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 达幽系统集成框架 - 用户表 dayou_sys_user
 *
 * @author dayou
 * @date 2020-04-23
 */
public class SysUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Long id;
    /**
     * 账号
     */
    private String account;
    /**
     * 密码
     */
    private String password;
    /**
     * 密码偏移量（用于加密）
     */
    private Integer offset;
    /**
     * 昵称
     */
    private String nickname;
    /**
     * 部门编号
     */
    private Integer deptId;
    /**
     * 角色
     */
    private String roles;
    /**
     * 头像base64
     */
    private String photoPath;
    /**
     * 最近一次登录ip
     */
    private String lastOnlineIp;
    /**
     * 在线状态
     */
    private Integer onlineState;
    /**
     * 可用状态
     */
    private Integer ableState;
    /**
     * 额外预留字段（用于定制业务）
     */
    private String extra;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getAccount() {
        return account;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getNickname() {
        return nickname;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setRoles(String roles) {
        this.roles = roles;
    }

    public String getRoles() {
        return roles;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public String getPhotoPath() {
        return photoPath;
    }

    public void setLastOnlineIp(String lastOnlineIp) {
        this.lastOnlineIp = lastOnlineIp;
    }

    public String getLastOnlineIp() {
        return lastOnlineIp;
    }

    public void setOnlineState(Integer onlineState) {
        this.onlineState = onlineState;
    }

    public Integer getOnlineState() {
        return onlineState;
    }

    public void setAbleState(Integer ableState) {
        this.ableState = ableState;
    }

    public Integer getAbleState() {
        return ableState;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("account", getAccount())
                .append("password", getPassword())
                .append("offset", getOffset())
                .append("nickname", getNickname())
                .append("deptId", getDeptId())
                .append("roles", getRoles())
                .append("photoPath", getPhotoPath())
                .append("lastOnlineIp", getLastOnlineIp())
                .append("onlineState", getOnlineState())
                .append("ableState", getAbleState())
                .append("deleted", getIsDeleted())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("extra", getExtra())
                .toString();
    }
}
